package com.yanqu.road.entity.log;

import com.yanqu.road.entity.FieldTypeAnnotation;

import java.util.Date;
import java.util.Map;

@FieldTypeAnnotation(tableName = "t_l_ck_watch_advertisement", desc = "广告观看日志", autoSave = true, uploadCk = true)
public class LogWatchAdvertisement extends ServerBaseLog {

    @FieldTypeAnnotation(desc = "活动ID", isIndex = true)
    private int activityId;
    @FieldTypeAnnotation(desc = "用户ID", isIndex = true)
    private long userId;
    @FieldTypeAnnotation(desc = "广告类型")
    private int advertisementType;
    @FieldTypeAnnotation(desc = "是否成功")
    private int success;
    @FieldTypeAnnotation(desc = "广告观看成功次数map", saveJson = true)
    private Map<Integer, Integer> totalWatchMap;
    @FieldTypeAnnotation(desc = "奖励")
    private String reward;
    @FieldTypeAnnotation(desc = "时间")
    private Date logTime;

    public LogWatchAdvertisement(int activityId, long userId, int advertisementType, int success, Map<Integer, Integer> totalWatchMap, String reward) {
        this.activityId = activityId;
        this.userId = userId;
        this.advertisementType = advertisementType;
        this.success = success;
        this.totalWatchMap = totalWatchMap;
        this.reward = reward;
        this.logTime = new Date();
    }

    public int getActivityId() {
        return activityId;
    }

    public void setActivityId(int activityId) {
        this.activityId = activityId;
    }

    public long getUserId() {
        return userId;
    }

    public void setUserId(long userId) {
        this.userId = userId;
    }

    public int getAdvertisementType() {
        return advertisementType;
    }

    public void setAdvertisementType(int advertisementType) {
        this.advertisementType = advertisementType;
    }

    public int getSuccess() {
        return success;
    }

    public void setSuccess(int success) {
        this.success = success;
    }

    public Map<Integer, Integer> getTotalWatchMap() {
        return totalWatchMap;
    }

    public void setTotalWatchMap(Map<Integer, Integer> totalWatchMap) {
        this.totalWatchMap = totalWatchMap;
    }

    public String getReward() {
        return reward;
    }

    public void setReward(String reward) {
        this.reward = reward;
    }

    public Date getLogTime() {
        return logTime;
    }

    public void setLogTime(Date logTime) {
        this.logTime = logTime;
    }
}
